package com.example.xm.myapplication;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import com.example.xm.myapplication.bean.PetInfo;
import com.loopj.android.image.SmartImageView;

public class ShowActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_show);

        Intent intent = getIntent();
        PetInfo pi = (PetInfo) intent.getSerializableExtra("obj");

        SmartImageView ivShowIcon = (SmartImageView) findViewById(R.id.ivShowIcon);
        TextView tvShowTitle = (TextView)findViewById(R.id.tvShowTitle);
        TextView tvShowContent = (TextView)findViewById(R.id.tvShowContent);
        TextView tvShowTag = (TextView) findViewById(R.id.tvShowTag);

        ivShowIcon.setImageUrl(pi.getIcon());
        tvShowTitle.setText(pi.getTitle());
        tvShowContent.setText(pi.getContent());
        tvShowTag.setText(pi.getTag());
    }
}
